﻿@model GoDinner.Models.Gerecht

@{
    ViewBag.Title = "Voeg een nieuw gerecht toe";
}

<h2>Voeg een nieuw gerecht toe</h2>
<br />

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Gerecht</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Naam)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Naam)
            @Html.ValidationMessageFor(model => model.Naam)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Prijs)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Prijs)
            @Html.ValidationMessageFor(model => model.Prijs)
        </div>

        <div class="editor-label">
            <label>Soort gerecht</label>
        </div>
        <br />
        <div class="editor-field">
            
            @Html.DropDownListFor(model => model.GerechtTypeId,
                         new SelectList(
                  new List<Object>{ 
                       new { value = 1 , text = "Voorgerechten"  },
                       new { value = 2 , text = "Hoofdgerechten" },
                       new { value = 3 , text = "Desserts"  },
                       new { value = 4 , text = "Supplementen" },
                       new { value = 5 , text = "Snacks"}
                    },
                  "value",
                  "text"))

            @Html.ValidationMessageFor(model => model.GerechtTypeId)
        </div>

        <p>
            @Html.ActionLink("<<Terug","OverzichtGerechten","Gerechten")
            
            <input type="submit" value="Opslaan" />            
        </p>
    </fieldset>
}



@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
